using System;
using FytSoa.Common.Utils;
using System.ComponentModel.DataAnnotations;
using SqlSugar;

namespace FytSoa.Application.Erp;

/// <summary>
/// erp-采购入库详细
/// </summary>
public class ErpPurchaseOrderInfoDto : AppEntity
{
    /// <summary>
    /// 采购入库订单编号
    /// </summary>
    public long OrderId { get; set; }

    /// <summary>
    /// 产品编号
    /// </summary>
    [Required]
    public long ProductId { get; set; }

    /// <summary>
    /// 产品信息
    /// </summary>
    public ErpProductSimpleDto Product { get; set; } = new();

    /// <summary>
    /// 入库数量
    /// </summary>
    [Required]
    public int Count { get; set; } = 0;

    /// <summary>
    /// 金额
    /// </summary>
    [Required]
    public decimal Amount { get; set; }
    
    /// <summary>
    /// 单位
    /// </summary>
    public string Unit { get; set; }
    
    /// <summary>
    /// 是否入库
    /// </summary>
    public bool IsInStock { get; set; } = false;

    /// <summary>
    /// 创建人
    /// </summary>
    public string CreateUser { get; set; }

    /// <summary>
    /// 创建时间
    /// </summary>
    [Required]
    public DateTime CreateTime { get; set; } = DateTime.Now;


}